package com.example.javabasic.sample.bootstrap;

import lombok.extern.slf4j.Slf4j;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;

/**
 * 如果依赖的字段在Bean的构造方法中声明，那么Spring框架会先实例这些字段对应的Bean，再调用当前的构造方法
 *
 * @author: cph
 * @date: 2021/11/11 18:32
 */
@Slf4j
@Component
public class ClassConstructorTest {

    private final Environment env;

    public ClassConstructorTest(Environment env) {
        this.env = env;
        log.info(">>>ClassConstructorTest# process...");
    }
}
